import {Routes} from '@angular/router';
import {AppComponent} from './app.component';
// import {DemoDetailComponent} from './detail/demo/demo.detail.component';
import { AddNoticeComponent } from './add-notice/add-notice.component';

import { MyTodoComponent } from './my-todo/my-todo.component';
import { MyDoneComponent } from './my-done/my-done.component';
import { MyFoundComponent } from './my-found/my-found.component';
import { HomeNoticeComponent } from './home-notice/home-notice.component';

export const routes: Routes = [ // Routes类型的数组
  {
    path: 'add',
    component: AddNoticeComponent
  },
  {
    path: 'todu',
    component: MyTodoComponent
  },
  {
    path: 'done',
    component: MyDoneComponent
  },
  {
    path: 'found',
    component: MyFoundComponent
  },
  {
    path:'home',
    component:HomeNoticeComponent
  },
  {
    path: '**',
    redirectTo: 'add'
  }
];
